package com.kk.poseidon.example;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.kk.poseidon.config.common.ApplicationConfig;

/**
* HelloController.java
* 类说明 TODO
*
* @author chengkai
* @date  2017年5月22日 下午2:24:48
*/
@Controller
public class HelloController {
    
    @Autowired
    private ApplicationContextUtils applicationContext;

    @RequestMapping(value = "/hello")
    @ResponseBody
    public String hello() {
        ApplicationConfig application = (ApplicationConfig) applicationContext.get().getBean("poseidon-example");
        return "hello world " + application.getName();
    }
    
}
